<%@page isErrorPage="true" contentType="text/html" %>
<%@page pageEncoding="UTF-8" %>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
    <title>Goodwill - Каталог товаров</title>
    <link rel="stylesheet" href="resources/css/main.css"/>
    <link rel="stylesheet" href="resources/css/stylesheet.css"/>
    <link rel="stylesheet" href="resources/css/clients.css"/>
    <style type="text/css">
    </style>
</head>
<body>
<f:view>
<jsp:include page="ClientHeader.jsp"/>
<h:form>
<%-- -------------- Список груп товаров -------------- --%>
<rich:dataGrid value="#{ClientGoodsBean.goodTypes}" var="goodType" columns="3" columnClasses="goods_cell" border="0" style="border:0">
    <rich:panel>
        <f:facet name="header">
            <h:outputText value="#{goodType.name}" style="font-size:120%"/>
        </f:facet>
        <a4j:repeat value="#{goodType.children}" var="child">
            <a4j:commandLink value="#{child.name}" ajaxSingle="true"
                             action="#{ClientGoodsSearchBean.searchByGoodType}"
                             oncomplete="document.location='ClientGoodsSearchPage.jsf'"
                             style="font-size:120%">
                <a4j:actionparam name="goodTypeId" assignTo="#{ClientGoodsSearchBean.searchParamGoodTypeId}" value="#{child.id}"/>
            </a4j:commandLink><br>
        </a4j:repeat>
    </rich:panel>
</rich:dataGrid>

<jsp:include page="ClientFooter.jsp"/>
</h:form>
</f:view>
</body>
<head>
    <meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</head>
</html>
